package com.wicket.okrapp.web.contorller;

import com.wicket.okrapp.biz.service.BusinessAtomService;
import com.wicket.okrapp.biz.service.dto.req.*;
import com.wicket.okrapp.biz.service.dto.res.*;
import com.wicket.okrapp.common.ro.OkrResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 * 
 * @version 1.0
 */
@RestController
@RequestMapping("/app/businessAtom/")
public class BusinessAtomController {

  @Autowired
  BusinessAtomService businessAtomService;
/**
   * D3查询内存业务数据详情(业务原子)
   */
    @PostMapping("queryMemoryBusinessDataSetDetailCom")
    public OkrResult<QueryMemoryBusinessDataSetDetailComRespDto> queryMemoryBusinessDataSetDetailCom(@RequestBody @Validated QueryMemoryBusinessDataSetDetailComReqDto reqDTO){
    return OkrResult.success(businessAtomService.queryMemoryBusinessDataSetDetailCom(reqDTO));
    }
/**
   * D3新增内存业务数据(业务原子)
   */
    @PostMapping("addMemoryBusinessSetDataCom")
    public OkrResult<AddMemoryBusinessSetDataComRespDto> addMemoryBusinessSetDataCom(@RequestBody @Validated AddMemoryBusinessSetDataComReqDto reqDTO){
    return OkrResult.success(businessAtomService.addMemoryBusinessSetDataCom(reqDTO));
    }
/**
   * D3通用分段查询业务数据对象(业务原子)
   */
    @PostMapping("implementGeneralSubsectionQueryBusinessDataSetCom")
    public OkrResult<ImplementGeneralSubsectionQueryBusinessDataSetComRespDto> implementGeneralSubsectionQueryBusinessDataSetCom(@RequestBody @Validated ImplementGeneralSubsectionQueryBusinessDataSetComReqDto reqDTO){
    return OkrResult.success(businessAtomService.implementGeneralSubsectionQueryBusinessDataSetCom(reqDTO));
    }
/**
   * D3分批次循环执行数据集(公共)
   */
    @PostMapping("implementExecuteDataSetInBatchCom")
    public OkrResult<ImplementExecuteDataSetInBatchComRespDto> implementExecuteDataSetInBatchCom(@RequestBody @Validated ImplementExecuteDataSetInBatchComReqDto reqDTO){
    return OkrResult.success(businessAtomService.implementExecuteDataSetInBatchCom(reqDTO));
    }
}
